inactiveTime = 0;

setTimeout(function () {

    setInterval("increment()", 60000);

    $(this).mousemove(function () {

        inactiveTime = 0;

    });

    $(this).keypress(function () {

        inactiveTime = 0;

    });
});

function increment() {

    inactiveTime += 1;

    if (inactiveTime > 9) {

        location = href = '/logout';

    }
}

